{% load static %}

<link rel="stylesheet" href="{% static 'polls/style.css' %}">

{% if latest_question_list %}
    <div style="font-family: 'Arial Rounded MT Bold', 'Comic Sans MS', cursive, sans-serif; max-width: 500px; margin: 20px auto; background-color: #f9f0ff; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(120, 0, 150, 0.2);">
        <div style="background: linear-gradient(135deg, #5a189a, #9d4edd); color: white; padding: 12px 15px; text-align: center; font-weight: bold; letter-spacing: 1px; position: relative;">
            <span style="font-size: 24px;">🖤</span> 
            <span style="text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);">KUROMI POLLS</span> 
            <span style="font-size: 24px;">💜</span>
            <div style="position: absolute; bottom: -10px; left: 0; right: 0; height: 10px; background: linear-gradient(90deg, transparent, #ff9ff3, #f368e0, #ff9ff3, transparent);"></div>
        </div>
        <ul style="list-style-type: none; padding: 0; margin: 0;">
        {% for question in latest_question_list %}
            <li style="border-bottom: 1px dashed #c77dff; padding: 12px 15px; background-color: #fff; transition: all 0.3s ease; position: relative;">
                <a href="{% url 'polls:detail' question.id %}" style="text-decoration: none; color: #5a189a; font-weight: bold; display: flex; align-items: center;">
                    <span style="display: inline-block; width: 25px; height: 25px; background-color: #9d4edd; color: white; border-radius: 50%; text-align: center; line-height: 25px; margin-right: 10px; font-size: 12px; box-shadow: 0 2px 3px rgba(93, 0, 150, 0.3);">⚡</span>
                     {{ question.question_text }}
                </a>
                <span style="position: absolute; right: 15px; color: #ff9ff3; font-size: 12px;">🖤</span>
            </li>
        {% endfor %}
        </ul>
        <div style="background: linear-gradient(90deg, #5a189a, #9d4edd, #5a189a); height: 5px;"></div>
    </div>
{% else %}
    <div style="font-family: 'Arial Rounded MT Bold', 'Comic Sans MS', cursive, sans-serif; text-align: center; padding: 25px; background-color: #f9f0ff; border-radius: 15px; max-width: 500px; margin: 20px auto; border: 2px dashed #9d4edd; box-shadow: 0 5px 15px rgba(120, 0, 150, 0.2);">
        <p style="color: #5a189a; font-size: 18px; margin: 0; font-weight: bold;">
            👻 没有库洛米投票，快来创建一个吧！ 💀
        </p>
        <div style="margin-top: 10px; font-size: 24px;">
            🖤💜🖤💜
        </div>
    </div>
{% endif %}

<!-- 添加的Admin按钮 -->
<div style="text-align: center; margin-top: 20px;">
    <a href="/admin/" style="display: inline-block; padding: 8px 16px; background: linear-gradient(135deg, #e0aaff, #c77dff); color: #3c096c; text-decoration: none; border-radius: 20px; font-weight: bold; box-shadow: 0 3px 6px rgba(93, 0, 150, 0.2); transition: all 0.3s ease; border: 1px solid #9d4edd;">
        🏰 进入管理员后台 🗝️
    </a>
</div>